﻿// Write a program that enters file name along with its full file path (e.g. C:\WINDOWS\win.ini), reads its contents and prints it on the console. 
// Find in MSDN how to use System.IO.File.ReadAllText(…). 
// Be sure to catch all possible exceptions and print user-friendly error messages.

using System;
using System.IO;

class ConsolePrintFileContent
{
    static void Main()
    {
        //string Path = @"C:\WINDOWS\win.ini";
        Console.Write("Enter file with full path: ");
        string path = Console.ReadLine();
        try
        {
            string fileContent = File.ReadAllText(path);
            Console.WriteLine("-----------File Content-----------");
            Console.WriteLine(fileContent);
        }
        catch (Exception e)
        {
            Console.WriteLine(e.Message);
        }
    }
}